package nl.utwente.csc.obsl.diagram.extension.part;

import nl.utwente.csc.obsl.diagram.extension.OBSLEditPart;
import nl.utwente.csc.obsl.diagram.extension.figure.AbsentFigure;

import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.XYLayout;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.sirius.diagram.ui.tools.api.figure.AirStyleDefaultSizeNodeFigure;
import org.eclipse.sirius.ui.tools.api.color.VisualBindingManager;

public class AbsentShapeEditPart extends OBSLEditPart {

	public AbsentShapeEditPart(View view) {
		super(view);
	}

	@Override
	protected IFigure createOBSLFigure() {
		return new AbsentFigure();
	}

	protected NodeFigure createNodeFigure() {
		NodeFigure figure = new AirStyleDefaultSizeNodeFigure(getMapMode()
				.DPtoLP(60), getMapMode().DPtoLP(60));
		figure.setLayoutManager(new XYLayout());
		IFigure shape = createOBSLFigure();
		shape.setBackgroundColor(VisualBindingManager.getDefault().getColorFromName("red"));
		shape.setForegroundColor(VisualBindingManager.getDefault().getColorFromName("black"));
		figure.add(shape);
		primaryShape = figure;
		return figure;
	}



}
